Auto merge of #3668 - KalitaAlexey:fix-example-metadata, r=alexcrichton
authorbors <bors@rust-lang.org>
Sat, 11 Feb 2017 17:20:36 +0000 (17:20 +0000)
committerbors <bors@rust-lang.org>
Sat, 11 Feb 2017 17:20:36 +0000 (17:20 +0000)
Reverted the "kind" field to the previous value.

Added a new field named "crate_types".
Fixes https://github.com/rust-lang/cargo/issues/3654
After this PR `cargo metadata` would output:
```json
{
    "packages": [
        {
            "targets": [
                {
                    "kind": ["lib"],
                    "crate_types": ["lib"]
                },
                {
                    "kind": ["example"],
                    "crate_types": ["staticlib"]
                }
            ]
        }
    ]
}
```

I have added tests.


Trivial merge